/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.offline.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 线下收银Entity
 * @author 线下收银
 * @version 2017-01-15
 */
public class TbOfflinePay extends DataEntity<TbOfflinePay> {
	
	private static final long serialVersionUID = 1L;
	private Long uid;		// 用户ID
	private String code;		// 消费码
	private String amount;		// 金额
	private String status;		// 0：未使用 1：已使用  2:已废弃
	private String payType;		// 0:物业钱包  1：麻雀钱包
	private Date createTime;		// create_time
	
	public TbOfflinePay() {
		super();
	}

	public TbOfflinePay(String id){
		super(id);
	}

	@NotNull(message="用户ID不能为空")
	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}
	
	@Length(min=1, max=20, message="消费码长度必须介于 1 和 20 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}
	
	@Length(min=1, max=3, message="0：未使用 1：已使用  2:已废弃长度必须介于 1 和 3 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Length(min=1, max=3, message="0:物业钱包  1：麻雀钱包长度必须介于 1 和 3 之间")
	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="create_time不能为空")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}